
<?php
if(file_exists('../db/opendb.php'))
require_once('../db/opendb.php');
function Get_Feature_Listings($user)
{

	$mquery = "select p.* from PROPERTIES p inner join Prop_Owner_Con c on p.OID = c.Prop_OID where c.Owner = '".$user."' and LISTSTATUS = 'Active'";
	$mresult = mysql_query($mquery) or die ("SQL Error".mysql_error());
	if(mysql_num_rows($mresult))
	{
		?>
			<div style="color:#333333; font-size:20px; padding:20px 0px 0px 0px; ">Active Listings</div>
		<?
		while ($row = mysql_fetch_assoc($mresult))
		{
			$query = "select * from Listing_Images where Listing_ID = '".$row['OID']."' and Main_Photo = 1";
			$result = mysql_query($query) or die ("SQL Error".mysql_error());
			$lrow = mysql_fetch_assoc($result);
			?>
			<table width="100%"  border="0" cellspacing="0" cellpadding="0" style="padding-top:0px; ">
			<TR>
				<TD colspan="2"><DIV style="font-size:18px; color:#CC0000; padding:10px 0px 0px 0px; "><?php echo $row['STREETNUM']." ".$row['STREETNAME']." ".$row['STREETSUFFIX'].", ".$row['CITY']." ".$row['STATE'] ?></DIV>
				</TD>
			</TR>
			  <tr>
			  <?php 
			  if($lrow['Path']!='')
			  {
			  ?>
			  <td width=120><img style="border:1px solid black;" src=<?php echo $lrow['Server_Path']."t_".$lrow['Path'] ?>></td>
			  <?
			  }
			  else
			  {
			  ?>
				<td width=120 align="center" valign="top"><img style="border:1px solid black;" src=<?php echo "http://www.realivent.com/listing_images/nia_thumb.gif" ?>></td>
			<?
			}
			?>
				<td width="*" valign="top" style="font-size:12px;">
				<DIV style="padding-top:0px;">
				<div style="float:left; padding-right:10px;"><?php echo $row['BEDS'] ?> Beds | </div>
				<div style="float:left; padding-right:10px; "><?php echo $row['BATHSTOTAL'] ?> Baths | </div>
				<div style="float:left; padding-right:10px; "><?php echo number_format($row['SQFTTOTAL'], 0) ?> SQFT | </div>
				<div style="float:left; padding-right:10px; ">Covered Parking: <?php echo $row['PARKINGCOVERED'] ?> </div>
				</DIV>
				<div style="clear:left"></div>
				<BR>
				<div style="float:left; padding-right:10px;">Asking Price: $<?php echo number_format($row['LISTPRICE'], 0) ?></div>
				<BR>
				
				<div style="padding-right:10px;"><a href=<?php echo SITE_ROOT_URL?>api/property_details.php?listing_id=<?php echo $row['OID'] ?>>More Details</a></div>
				
				</td>
			  </tr>
			</table>
	
			<?
		}
	}
	$mquery = "select p.* from PROPERTIES p inner join Prop_Owner_Con c on p.OID = c.Prop_OID where c.Owner = '".$user."' and LISTSTATUS = 'Pending'";
	$mresult = mysql_query($mquery) or die ("SQL Error".mysql_error());
	if(mysql_num_rows($mresult))
	{
		?>
			<div style="color:#333333; font-size:20px; padding:20px 0px 0px 0px;  ">Pending Listings</div>
		<?
		while ($row = mysql_fetch_assoc($mresult))
		{
			$query = "select * from Listing_Images where Listing_ID = '".$row['OID']."' and Main_Photo = 1";
			$result = mysql_query($query) or die ("SQL Error".mysql_error());
			$lrow = mysql_fetch_assoc($result);
			?>
			<table width="100%"  border="0" cellspacing="0" cellpadding="0" style="padding-top:0px; ">
			<TR>
				<TD colspan="2"><DIV style="font-size:18px; color:#CC0000; padding:10px 0px 5px 0px;  "><?php echo $row['STREETNUM']." ".$row['STREETNAME']." ".$row['STREETSUFFIX'].", ".$row['CITY']." ".$row['STATE'] ?></DIV></TD>
			</TR>
			  <tr>
				<td width=120><img style="border:1px solid black;" src=<?php echo $lrow['Server_Path']."t_".$lrow['Path'] ?>></td>
				<td width="*" valign="top" style="font-size:12px;">
				<DIV style="padding-top:5px;">
				<div style="float:left; padding-right:10px;"><?php echo $row['BEDS'] ?> Beds | </div>
				<div style="float:left; padding-right:10px; "><?php echo $row['BATHSTOTAL'] ?> Baths | </div>
				<div style="float:left; padding-right:10px; "><?php echo number_format($row['SQFTTOTAL'], 0) ?> SQFT | </div>
				<div style="float:left; padding-right:10px; ">Covered Parking: <?php echo $row['PARKINGCOVERED'] ?> </div>
				</DIV>
				<div style="clear:left"></div>
				<BR>
				<div style="float:left; padding-right:10px;">Asking Price: $<?php echo number_format($row['LISTPRICE'], 0) ?></div>
				<BR>
				
				<div style="padding-right:10px;"><a href=<?php echo SITE_ROOT_URL?>api/property_details.php?listing_id=<?php echo $row['OID'] ?>>More Details</a></div>
				
				</td>
			  </tr>
			</table>
	
			<?
		}
	}
	$mquery = "select p.* from PROPERTIES p inner join Prop_Owner_Con c on p.OID = c.Prop_OID where c.Owner = '".$user."' and LISTSTATUS = 'Sold'";
	$mresult = mysql_query($mquery) or die ("SQL Error".mysql_error());
	if(mysql_num_rows($mresult))
	{
		?>
			<div style="color:#333333; font-size:20px; padding:20px 0px 0px 0px;  ">Sold Listings</div>
		<?
		while ($row = mysql_fetch_assoc($mresult))
		{
			$query = "select * from Listing_Images where Listing_ID = '".$row['OID']."' and Main_Photo = 1";
			$result = mysql_query($query) or die ("SQL Error".mysql_error());
			$lrow = mysql_fetch_assoc($result);
			?>
			<table width="100%"  border="0" cellspacing="0" cellpadding="0" style="padding-top:0px; ">
			<TR>
				<TD colspan="2"><DIV style="font-size:18px; color:#CC0000; padding:10px 0px 5px 0px;  "><?php echo $row['STREETNUM']." ".$row['STREETNAME']." ".$row['STREETSUFFIX'].", ".$row['CITY']." ".$row['STATE'] ?></DIV></TD>
			</TR>
			  <tr>
				<td width=120><img style="border:1px solid black;" src=<?php echo $lrow['Server_Path']."t_".$lrow['Path'] ?>></td>
				<td width="*" valign="top" style="font-size:12px;">
				<DIV style="padding-top:5px;">
				<div style="float:left; padding-right:10px;"><?php echo $row['BEDS'] ?> Beds | </div>
				<div style="float:left; padding-right:10px; "><?php echo $row['BATHSTOTAL'] ?> Baths | </div>
				<div style="float:left; padding-right:10px; "><?php echo number_format($row['SQFTTOTAL'], 0) ?> SQFT | </div>
				<div style="float:left; padding-right:10px; ">Covered Parking: <?php echo $row['PARKINGCOVERED'] ?> </div>
				</DIV>
				<div style="clear:left"></div>
				<BR>
				<div style="float:left; padding-right:10px;">Asking Price: $<?php echo number_format($row['LISTPRICE'], 0) ?></div>
				<BR>
				
				<div style="padding-right:10px;"><a href=<?php echo SITE_ROOT_URL?>api/property_details.php?listing_id=<?php echo $row['OID'] ?>>More Details</a></div>
				
				</td>
			  </tr>
			</table>
	
			<?
		}
	}
}

function Get_Listing_Details($listing_id)
{
	
	$mquery = "select p.*, Name from PROPERTIES p inner join Prop_Types on p.PROPTYPE = ID where p.OID = '".$listing_id."'";
	$mresult = mysql_query($mquery) or die ("SQL Error".mysql_error());
	$row = mysql_fetch_assoc($mresult);
	?>
<TABLE style="font-size:12px;">
	  <TR>
		<TD style="padding-left:30px;" align="left" colspan="3"><DIV id=listing_header style="font-size:24px;"><?php echo $row['STREETNUM']." ".$row['STREETNAME']." ".$row['STREETSUFFIX'].", ".$row['CITY']." ".$row['STATE'] ?></DIV><div style="float:left; "></div></div></TD>
	  </TR>
	  <TR>
		<TD valign="top" align="left">
			<table style="padding-left:0px;" width="100%" border="0" cellspacing="0" cellpadding="0">
			
				 <tr>
		<td  valign="top">
			<!--main body-->
			<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-left:0px; ">
				<TR>
					<TD style="padding-left:10px; color:white" height=20px colspan="3" bgcolor="#333333"><a id=listing_link target="_blank" style="color:white; text-decoration:none" href=http://www.realivent.com/print_listing.php?listing_id=<?php echo $listing_id ?>>Printer Friendly Version</a> | <a id=listing_link style="color:white; text-decoration:none" href=http://www.realivent.com/email_friend_cl.php?listing_id=<?php echo $listing_id ?>>Email to Friend</a><!-- | <a target="_blank" style="color:white; text-decoration:none" href=print_listing.php?listing_id=<?php //echo $oid ?>>Save</a>--></TD>
				  </TR>
			  <tr>
			<td width="420" valign="top" style="padding:10px;" align="left">
		
			
<?php 
	
	$mquery = "select * from Listing_Images where Listing_ID = '".$listing_id."' and Main_Photo = '1'";
	$mresult = mysql_query($mquery) or die ("SQL Error".mysql_error());
	if($mrow = mysql_fetch_assoc($mresult))
	{
	
		list($width_orig, $height_orig, $image_type) = getimagesize('http://www.realivent.com/listing_images/resize_'.$mrow['Path']);
		if($width_orig > $height_orig)
		{
			//this picture is a landscape
			$width = 400;
			$height = ($width/$width_orig)*$height_orig;
		}
		else
		{
			$height = 400;
			$width = ($height/$height_orig)*$width_orig;
		}
		$main_image = $mrow['Server_Path']."resize_".$mrow['Path'];
	}
	else
	{
		list($width_orig, $height_orig, $image_type) = getimagesize('http://www.realivent.com/listing_images/no_photo.gif');
		if($width_orig > $height_orig)
		{
			//this picture is a landscape
			$width = 400;
			$height = ($width/$width_orig)*$height_orig;
		}
		else
		{
			$height = 400;
			$width = ($height/$height_orig)*$width_orig;
		}
		$main_image = 'http://www.realivent.com/listing_images/no_photo.gif';
	}																				

	?>
			<table width="100%" height='305px' border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td valign=middle height='305px' style="padding:2px;"><div align=center id='main_image' style="border:0px solid black; padding:0px;"><img style="border:1px solid black; " src='<?php echo $main_image?>' width = '<?php echo $width ?>' height='<?php echo $height ?>'></div></td>
			  </tr>
			  <tr>
				<td width="100%">
				<script language="javascript">
				function get_image(url) 
				{
				//alert("<img style='border:1px solid black;' src='http://www.realivent.com/listing_images/resize_"+url+"'>")
					window.document.getElementById('main_image').innerHTML = "<img style='border:1px solid black;' src=http://www.realivent.com/listing_images/resize_"+url+">"
				}
				</script>
				<DIV>
				<?
				$mquery2 = "select * from Listing_Images where Listing_ID = '".$listing_id."' and Type = 'IMAGE'";
				$mresult2 = mysql_query($mquery2) or die ("SQL Error".mysql_error());
				while($mrow2 = mysql_fetch_assoc($mresult2))
				{
					?>
					<a href=# onClick="get_image('<?php echo $mrow2['Path'] ?>');"><img width=51 height=38 style="border:1px solid black;" src=<?php echo $mrow2['Server_Path']."t_".$mrow2['Path'] ?>></a>
					<?
				}
				?>
				</DIV>
				<!--<div><a target="_blank" href=http://local.live.com/default.aspx?cp=<?php //echo $row['LONGITUDE'] ?>~<?php//echo $row['LATITUDE'] ?>&lvl=1scene=3050&style=o&v=2>Bird's Eye View</a></div>-->
				</td>
			  </tr>
			</table>
		</td>
		<td width="*" valign="top" align="left" id=listing_middle_column>
		<!--main content-->
			<div id=listing_column_header>Asking Price: $<?php echo number_format($row['LISTPRICE'], 0) ?></div>
			<div>Type: <?php echo $row['Name'] ?></div>
			<div><?php echo $row['BEDS'] ?> Beds</div>
			<div><?php echo $row['BATHSTOTAL'] ?> Baths</div>
			<?php if (!number_format($row['SQFTTOTAL'], 0) < 1){ ?>
			<div><?php echo number_format($row['SQFTTOTAL'], 0) ?> SQFT</div>
			<?php }?>
			<?php if ($row['STORIES'] > 0){ ?>
			<div>Stories: <?php echo number_format($row['Stories'], 0) ?></div>
			<?php }?>
			<?php if (!number_format($row['PARKINGCOVERED'], 0) < 1){ ?>
			<div>Covered Parking: <?php echo $row['PARKINGCOVERED'] ?></div>
			<?php }?>
			<?php if (number_format($row['ASSOCFEE'], 2) > 0){ ?>
			<div>HOA: $<?php echo number_format($row['ASSOCFEE'], 2) ?></div>
			<?php }?>
			<?php if ($row['YEARBUILT'] > 0){ ?>
			<div>Year Built: <?php echo $row['YEARBUILT'] ?></div>
			<?php }?>
			<?php if ($row['STYLE'] != ''){ ?>
			<div>Style: <?php echo $row['STYLE'] ?></div>
			<?php }?>
			<?php if ($row['MLSNUM'] != ''){ ?>
			<div>MLS Number: <?php echo $row['MLSNUM'] ?></div>
			<?php }?>
			
			<Br>
			<div id=listing_column_header>Description</div>
			<div style="padding-right:10px; "><?php echo $row['REMARKS'] ?></div><BR />
			<?php if ($row['IVR'] != ''){ ?>
			<div align="center" style="font-size:14px; color:#CC0000"><strong>24 HR Recorded Information</strong></div>
			<DIV align=center style="font-size:16px;"><?php echo $row['IVR'] ?></div>
			<?php }
			
			$oquery = "select * from Events where Listing_ID = '".$listing_id."' and Event_Date > curdate()";
			$oresult = mysql_query($oquery) or die ("SQL Error".mysql_error());
			if(mysql_num_rows($oresult))
			{
			?>
			<div id=listing_column_header>Open Houses</div>
			
			<div style="padding-bottom:20px;">
			
			<?php 
			
			while($orow = mysql_fetch_assoc($oresult))
			{
				?>
				<div style="padding:5px;">
				<DIV style="text-decoration:underline; font-size:14px;"><strong><?php echo $orow['Title'] ?></strong></DIV>
				<DIV><strong><?php echo date('F j, Y', strtotime($orow['Event_Date'])) ?></strong></DIV>
				<DIV><strong>From:</strong> <?php echo $orow['Time_From'] ?> to <?php echo $orow['Time_To'] ?> <?php echo $orow['Time_Fix'] ?></DIV>
				</div>
				<?
			}
			?>
			</div>
			<?
			}
			?>
			<div id=listing_column_header>Offered By</div>
			<?php 
			/* agent information */
			$asql = "Select * from Users u inner join Prop_Owner_Con c on c.Owner = u.ID where c.Prop_OID = '".$listing_id."'";
			$aresult = mysql_query($asql) or die ("SQL Error".mysql_error());
			$arow=mysql_fetch_assoc($aresult);
			?>
			<!--<div><a href=http://www.realivent.com/user_profile.php?id=<?php //echo $arow['ID'] ?>>view profile</a> | <a href=http://www.realivent.com/user_listings.php?id=<?php //echo $arow['ID'] ?>>view listings</a> | <a href=http://www.realivent.com/user_stories.php?id=<?php //echo $arow['ID'] ?>>view news</a> | <a href=http://www.realivent.com/user_profile.php?id=<?php //echo $arow['ID'] ?>>view blog</a></div>-->

			<DIV style="padding-top:10px;">
			<div style="float:left"><img src='<?php SITE_ROOT_URL?>user_images/t_<?php echo $arow['Image'] ?>'></div>
			<div style="float:left">
			<div><strong><?php echo $arow['First_Name'] ?> <?php echo $arow['Last_Name'] ?></strong></div>
			<div>Phone: <?php echo $arow['Phone'] ?></div>
			<div>Email: <a href=mailto:<?php echo $arow['Email'] ?>><?php echo $arow['Email'] ?></a></div>
			<div>Website: <a href=http://<?php echo $arow['Website'] ?>><?php echo $arow['Website'] ?></a></div>
			<div align="right" style="padding:5px;"><img src='<?php SITE_ROOT_URL?>user_images/t_<?php echo $arow['Company_Logo'] ?>'></div>
			</div>


			</div>
			
		</td>
	</table>
	<!--<TABLE width="100%">
		<TR>
			<TD style="width:100%; padding-left:30px; border-top:1px solid #CCCCCC;" align="center">
			
				<?php //include('feature_control.php'); 
				//get_features($oid);
				?>
			
			</TD>
		</TR>
	</TABLE>-->
	</TD>
	</tr>
</table>
<?
}

function about_me($user_id)
{
	$aquery = "select * from Users where ID = '".$user_id."'";
	$aresult = mysql_query($aquery) or die ("SQL Error".mysql_error());
	$arow = mysql_fetch_assoc($aresult);
	?>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
		<td style="padding:10px; width:100px;">
		<img style="border:1px solid black;" src='<?php SITE_ROOT_URL?>user_images/t_<?php echo $arow['Image'] ?>'>
		</td>
		<TD style="width:400px">
		<strong>"<?php echo $arow['Mantra'] ?>"</strong>
		</TD>
	</TR>
	<TR>
		<TD colspan="2">
		<div style="clear:left; font-size:16px; color:#CC0000; ">Contact Information</div>
		<div style="clear:left; font-size:16px; color:#333333; ">
		<?php echo $arow['Phone']? "<strong>Phone: </strong>".$arow['Phone']: ''?>
		</div>
		<div style="clear:left; font-size:16px; color:#333333; ">
		<?php echo $arow['Email']? "<strong>Email: </strong><a href=mailto:".$arow['Email'].">".$arow['Email']."</a>": ''?>
		</div>
		<div style="clear:left; padding-top:20px;"><?php echo $arow['Profile'] ?></div>
		</td>
	  </tr>
	</table>

	
	<?
	
}

function submit_listing_watch()
{

	$user_id = get_user_id();
	//get the user email
	$aquery = "select * from Users where ID = '".$user_id."'";
	$aresult = mysql_query($aquery) or die ("SQL Error".mysql_error());
	$arow = mysql_fetch_assoc($aresult);
	
	
	$areasofinterest = $_POST['areasOfInterest'];
	$pricerange = $_POST['priceRange'];
	$timeframe = $_POST['timeFrame'];
	$propertytype = $_POST['propertyType'];
	$numberofbedrooms = $_POST['numberOfBedrooms'];
	$numberofbathrooms = $_POST['numberOfBathrooms'];
	$minsquarefoot = $_POST['minSquareFoot'];
	$floors = $_POST['Floors'];
	$parking = $_POST['parking'];
	$spaces = $_POST['spaces'];
	$lotsize = $_POST['lotSize'];
	$ageofhome = $_POST['ageOfHome'];
	$specialfeaturespool = $_POST['specialFeaturesPool'];
	$specialfeaturesspa = $_POST['specialFeaturesSpa'];
	$specialfeaturesview = $_POST['specialFeaturesView'];
	$specialfeaturesbasement = $_POST['specialFeaturesBasement'];
	$specialfeaturesguesthouse = $_POST['specialFeaturesGuestHouse'];
	$specialfeaturesairconditioning = $_POST['specialFeaturesAirConditioning'];
	$homestyle = $_POST['homeStyle'];
	$landscaping = $_POST['landscaping'];
	$localschoolselementary = $_POST['localSchoolsElementary'];
	$localschoolsmiddleschool = $_POST['localSchoolsMiddleSchool'];
	$localschoolshighschool = $_POST['localSchoolsHighSchool'];
	$otherrequests = $_POST['otherRequests'];
	$uname = $_POST['uname'];
	$phonearea = $_POST['phoneArea'];
	$phonepre = $_POST['phonePre'];
	$phonesuff = $_POST['phoneSuff'];
	$email = $_POST['email'];
	$preferredcontact = $_POST['preferredContact'];
	$besttime = $_POST['bestTime'];
	
	// To send HTML mail, the Content-type header must be set
	$headers  = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	
	// Additional headers
	$headers .= 'From:'.$_SERVER['HTTP_HOST']."<".$email."> \r\n";
	$message = "<strong><U>New Signup for Property Watch</u></strong><BR>";
	$message .= "<strong>Areas of Interest:</strong> ".$areasofinterest."<BR>";
	$message .= "<strong>Price Range:</strong> ".$pricerange."<BR>";
	$message .= "<strong>Time Frame:</strong> ".$timeframe."<BR>";
	$message .= "<strong>Property Type:</strong> ".$propertytype."<BR>";
	$message .= "<strong>Number of Beds:</strong> ".$numberofbedrooms."<BR>";
	$message .= "<strong>Number of Baths:</strong> ".$numberofbathrooms."<BR>";

	$message .= "<strong>Minumum SQFT:</strong> ".$minsquarefoot."<BR>";
	$message .= "<strong>Floors:</strong> ".$floors."<BR>";
	$message .= "<strong>Parking Type:</strong> ".$parking."<BR>";
	$message .= "<strong>Number of Spaces:</strong> ".$spaces."<BR>";
	$message .= "<strong>Lotsize:</strong> ".$lotsize."<BR>";
	$message .= "<strong>Age of Home:</strong> ".$ageofhome."<BR>";
	
	$message .= "<strong>Pool:</strong> ".$specialfeaturespool."<BR>";
	$message .= "<strong>Spa:</strong> ".$specialfeaturesspa."<BR>";
	$message .= "<strong>View:</strong> ".$specialfeaturesview."<BR>";
	$message .= "<strong>Basement:</strong> ".$specialfeaturesbasement."<BR>";
	$message .= "<strong>Guest House:</strong> ".$specialfeaturesguesthouse."<BR>";
	$message .= "<strong>Air Conditioning:</strong> ".$specialfeaturesairconditioning."<BR>";
	
	$message .= "<strong>Home Style:</strong> ".$homestyle."<BR>";
	$message .= "<strong>Landscaping:</strong> ".$landscaping."<BR>";
	$message .= "<strong>Elementary:</strong> ".$localschoolselementary."<BR>";
	$message .= "<strong>Middle School:</strong> ".$localschoolsmiddleschool."<BR>";
	$message .= "<strong>High School:</strong> ".$localschoolshighschool."<BR>";
	$message .= "<strong>Other Requests:</strong> ".$otherrequests."<BR><BR>";
	
	$message .= "<strong>Name:</strong> ".$uname."<BR>";
	$message .= "<strong>Phone:</strong> (".$phonearea.") ".$phonepre." ".$phonesuff."<BR>";
	$message .= "<strong>Email:</strong> ".$email."<BR>";
	$message .= "<strong>Preferred Contact Method:</strong> ".$preferredcontact."<BR>";
	$message .= "<strong>Best Time to Call:</strong> ".$besttime."<BR><BR>";
	
	$to = $arow['Email'];
	$subject = 'New Signup for Property Watch';
	$body = $message;
	mail($to, $subject, $body, $headers);
	
	echo "<BR><BR><BR>Message has been sent, we will create a property watch for you and you will start to receive new listings emailed to you shortly. If we have any confusion about what you are looking for, we will
	contact you by your preferred method of contact.<BR><BR>If you have any questions, feel free to contact me at ".$arow['Phone'];
}

function get_listing_watch_form()
{
?>

<form action='<?php echo $_SERVER['REQUEST_URI']?>?check=Yes' method="post">
<table cellpadding="2" cellspacing="2">
	<tbody>
		<TR>
			<td colspan="2"><HR /></td>
		</TR>
		<tr>
			<td class="label" valign="top">Areas of Interest:</td>
			<td><textarea cols="36" name="areasOfInterest" rows="2"></textarea></td>
		</tr>
		<tr>
			<td class="label">Price Range:</td>

			<td><select name="priceRange"> 
			<option>
			</option> 
			<option>
			Less than $100,000</option> 
			<option>
			$100,000 - $200,000</option> 
			<option>
			$200,000 - $300,000</option> 
			<option>

			$300,000 - $400,000</option> 
			<option>
			$400,000 - $500,000</option> 
			<option>
			$500,000 - $600,000</option> 
			<option>
			$600,000 - $700,000</option> 
			<option>
			$700,000 - $800,000</option> 
			<option>

			$800,000 - $900,000</option> 
			<option>
			$900,000 - $1,000,000</option> 
			<option>
			$1,000,000 - $1,200,000</option> 
			<option>
			$1,200,000 - $1,500,000</option> 
			<option>
			$1,500,000+</option></select> </td>

		</tr>
		<tr>
			<td class="label">Time frame for purchasing:</td>
			<td><select name="timeFrame"> 
			<option>
			</option> 
			<option>
			Just Looking</option> 
			<option>

			Right Away</option> 
			<option>
			Within 90 Days</option> 
			<option>
			Within 6 Months</option> 
			<option>
			Within 1 Year</option></select> </td>
		</tr>

		<tr>
			<td colspan="2">
			<hr />
			</td>
		</tr>
		<tr>
			<td class="label">Property Type:</td>
			<td><select name="propertyType"> 
			<option>

			</option> 
			<option>
			Single Family Residence</option> 
			<option>
			Town House</option> 
			<option>
			Condominium</option> 
			<option>
			Duplex</option> 
			<option>

			Custom</option></select> </td>
		</tr>
		<tr>
			<td class="label">Number of Bedrooms:</td>
			<td><select name="numberOfBedrooms"> 
			<option>
			</option> 
			<option value="1">

			1+</option> 
			<option value="2">
			2+</option> 
			<option value="3">
			3+</option> 
			<option value="4">
			4+</option> 
			<option value="5">
			5+</option></select> </td>

		</tr>
		<tr>
			<td class="label">Number of Bathrooms:</td>
			<td><select name="numberOfBathrooms"> 
			<option>
			</option> 
			<option value="1">
			1+</option> 
			<option value="2">

			2+</option> 
			<option value="3">
			3+</option> 
			<option value="4">
			4+</option> 
			<option value="5">
			5+</option></select> </td>
		</tr>

		<tr>
			<td class="label">Minimum Square Footage:</td>
			<td><select name="minSquareFoot"> 
			<option>
			</option> 
			<option>
			Less than 1000</option> 
			<option>
			1000 - 1500</option> 
			<option>

			1500 - 2000</option> 
			<option>
			2000 - 2500</option> 
			<option>
			2500 - 3000</option> 
			<option>
			3000 - 3500</option> 
			<option>
			3500 - 4000</option> 
			<option>

			4000 - 5000</option> 
			<option>
			5000+</option></select> </td>
		</tr>
		<tr>
			<td class="label">Floors:</td>
			<td><select name="Floors"> 
			<option>

			</option> 
			<option>
			Single Story</option> 
			<option>
			Two Story</option> 
			<option>
			No Preference</option></select> </td>
		</tr>

		<tr>
			<td class="label">Parking:</td>
			<td><select name="parking"> 
			<option>
			</option> 
			<option>
			Attached</option> 
			<option>
			Detached</option> 
			<option>

			Carport</option> 
			<option>
			On Street</option> 
			<option>
			None</option></select> </td>
		</tr>
		<tr>
			<td class="label">Spaces:</td>

			<td><select name="spaces"> 
			<option>
			</option> 
			<option value="1">
			1</option> 
			<option value="2">
			2</option> 
			<option value="3">
			3</option> 
			<option value="4">

			4</option> 
			<option value="5">
			5</option> 
			<option value="6">
			6+</option></select> </td>
		</tr>
		<tr>
			<td class="label">Lot Size (acres):</td>

			<td><select name="lotSize"> 
			<option>
			</option> 
			<option>
			Less than .25</option> 
			<option>
			.25</option> 
			<option>
			.5</option> 
			<option>

			.75</option> 
			<option>
			1</option> 
			<option>
			2 - 5</option> 
			<option>
			5+</option></select> </td>
		</tr>

		<tr>
			<td class="label">Age of Home:</td>
			<td><select name="ageOfHome"> 
			<option>
			</option> 
			<option>
			1 - 3 Years</option> 
			<option>
			3 - 5 Years</option> 
			<option>

			5 - 10 Years</option> 
			<option>
			10 - 20 Years</option> 
			<option>
			20+ Years</option></select> </td>
		</tr>
		<tr>
			<td colspan="2">

			<hr />
			</td>
		</tr>
		<tr>
			<td class="label">Special Features:</td>
			<td>
			<table cellpadding="0" cellspacing="0" width="100%">
				<tbody>

					<tr>
						<td><input name="specialFeaturesPool" type="checkbox" value="YES" />Pool</td>
						<td><input name="specialFeaturesSpa" type="checkbox" value="YES" />Spa</td>
						<td><input name="specialFeaturesView" type="checkbox" value="YES" />View</td>
					</tr>
					<tr>
						<td width="110"><input name="specialFeaturesBasement" type="checkbox" value="YES" />Basement</td>

						<td width="110"><input name="specialFeaturesGuestHouse" type="checkbox" value="YES" />Guest House</td>
						<td><input name="specialFeaturesAirConditioning" type="checkbox" value="YES" />A/C</td>
					</tr>
				</tbody>
			</table>
			</td>
		</tr>
		<tr>

			<td class="label">Home Style:</td>
			<td><textarea cols="36" name="homeStyle" rows="2"></textarea></td>
		</tr>
		<tr>
			<td class="label">Type of Landscaping:</td>
			<td><textarea cols="36" name="landscaping" rows="2"></textarea></td>
		</tr>

		<tr>
			<td class="label">Local Schools:</td>
			<td>
			<table cellpadding="0" cellspacing="0" width="100%">
				<tbody>
					<tr>
						<td width="110"><input name="localSchoolsElementary" type="checkbox" value="Yes" />Elementary</td>
						<td width="110"><input name="localSchoolsMiddleSchool" type="checkbox" value="Yes" />Middle School</td>

						<td><input name="localSchoolsHighSchool" type="checkbox" value="Yes" />High School</td>
					</tr>
				</tbody>
			</table>
			</td>
		</tr>
		<tr>
			<td class="label">Other Specific Details<br />

			or Requests:</td>
			<td><textarea cols="36" name="otherRequests" rows="4"></textarea></td>
		</tr>
		<tr>
			<td align="center" colspan="2">
			<hr />
			&nbsp;</td>
		</tr>

		<tr>
			<td>Name:</td>
			<td><input name="uname" size="30" type="text" /></td>
		</tr>
		<tr>
			<td>Phone:</td>
			<td>(<input name="phoneArea" size="3" type="text" />) <input name="phonePre" size="3" type="text" />&nbsp;- <input name="phoneSuff" size="4" type="text" /></td>

			<td rowspan="2"></td>
		</tr>
		<tr>
			<td>Email:</td>
			<td><input name="email" size="30" type="text" /></td>
		</tr>
		<tr>
			<td colspan="2">Best way to reach you:&nbsp;&nbsp; <span style="font-weight: normal"><input name="preferredContact" type="radio" value="phone" />Phone <input name="preferredContact" type="radio" value="Email" />Email</span></td>

		</tr>
		<tr>
			<td colspan="2">Best Time to Call:&nbsp;&nbsp; <select name="bestTime"> 
			<option>
			</option> 
			<option value="1">
			Days</option> 
			<option value="2">
			Evenings</option> 
			<option value="3">

			Weekends</option></select> </td>
		</tr>
		<tr>
			<td align="center" colspan="2">
			<hr />
			<input name='submit' type="submit" value="Submit" /></td>
		</tr>
		<tr>

			<td height="30">&nbsp;</td>
		</tr>
	</tbody>
</table>
</form>
<?
}
?>

